home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / READSCRN.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  47 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   READSCRN.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. $INCLUDE "DAS-NBT1.INC"
  19. COLOR 7, 0
  20. CLS
  21. ? "┌────────────────────────────────────────────────────────────────────────
  22. ? "│ fReadSCREEN$ ( Row?, Col?, Cols? )
  23. ? "├─────────────────────────────────────────────────────────────────────────────
  24. ? "│ Pulls the text out of screen memory. The function will read past the end of
  25. ? "│ the line. It will NOT automatically stop when it has reached the end of
  26. ? "│ the screen.
  27. ? "└─────────────────────────────────────────────────────────────────────────────
  28.                                             '┌────────────────────────────
  29.   TBoxFILL 10, 2, 15, 78, 177, 15           '│ fill the screen with ▒'s
  30.   TBoxDRAW 16, 24, 3, 34, 1, 15             '│ 3 display boxes
  31.   TBoxDRAW 11, 24, 3, 34, 2, 15             '│
  32.   TBoxDRAW 21, 24, 3, 34, 2, 15             '│
  33.   D$ = " READ THIS TEXT FROM THE SCREEN "   '│ our test string
  34.   Tprint 17, 25, D$, 12                     '│ print in box 1
  35.                                             '└───────────────────────────┐
  36.   GotText$ = fReadSCREEN$ ( 17, 25, 32 )    '   you can do this!         │
  37.                                             '┌───────────────────────────┘
  38.   Tprint 12, 25, GotText$, 14               '│
  39.                                             '└───────────────────────────┐
  40.   S$ = SPACE$( 32 )                         '─┐                          │
  41.   FOR Col? = 25 TO 56                       ' │                          │
  42.     Char? = SCREEN ( 17, Col? )             ' ├─  or all of this!        │
  43.     MID$( S$, (Col?-24),1 ) = CHR$(Char?)   ' │                          │
  44.   NEXT                                      '─┘                          │
  45.                                             '┌───────────────────────────┘
  46.   Tprint 22, 25, S$, 09                     '└────────────────────────────
  47.